Skip to content

feat: add structured histogram to status proto for up/down speeds#5058

Closed
janos wants to merge 3 commits intomasterfrom
status-protocol-with-metrics
Closed

feat: add structured histogram to status proto for up/down speeds#5058
janos wants to merge 3 commits intomasterfrom
status-protocol-with-metrics

Conversation

@janos
Copy link
Member

@janos janos commented Mar 24, 2025

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

This PR adds metrics to the status protocol for analysing upload and download speeds on different nodes.

Upload and download speed metrics

Upload and download metrics for speed are new ones so that they are measuring only the /bzz uploads and downloads, not /bytes or any other POST methods, making them more specific than content api duration metric which aggregates measurements from all endpoints into one metric.

Status protocol fields

Structured approach (Histogram type)

This approach uses the structured histogram. This comes with a few drawbacks. One is the complexity and more important one is the inability to add vectors in such way because of the restrictions in the prometheus client for directly getting all labels form a vector metric.

Alternative (string field with all metrics)

To overcome both drawbacks, approach where all metrics are sent in a form of a string field in prometheus format. This is more flexible (easier to expose metrics) and convenient, but less transparent and less pretty by my opinion.

It is up for a discussion on both approaches.

Open API Spec Version Changes (if applicable)

TODO: add new fields to the status response.

Motivation and Context (Optional)

Related Issue (Optional)

#5005

Screenshots (if appropriate):

@janos janos mentioned this pull request Mar 24, 2025
4 tasks
@janos
Copy link
Member Author

janos commented Mar 27, 2025

Closing in favour to #5059.

@janos janos closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant